﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Bocom.ICenter.UI.Silverlight
{

#if WPF
    using Bocom.ICenter.UI.WPF;
#endif

    /// <summary>
    /// 初始化参数
    /// </summary>
    public class InitParament
    {

        #region 示意图

        /// <summary>
        /// 电子地图 轨迹回放 底图
        /// </summary>
        public string BaseMapUrl
        {
            get
            {
                return "http://192.168.58.91/ArcGIS/rest/services/ShangHaiTile/MapServer";
            }
        }

        /// <summary>
        /// 电子地图 轨迹回放 加载线路地址 
        /// {0} 传递线路ID  如： 0451
        /// </summary>
        public string RouteMapUrl
        {
            get
            {
                return "http://192.168.58.91/ArcGIS/rest/services/{0}/MapServer";
            }
        }


        /// <summary>
        ///  示意图站间距离 判断车辆重合
        /// </summary>
        public double StationZoneDistance
        {
            get
            {
                return 230;
            }
        }


        /// <summary>
        /// 示意图 测试线路   -- 不在使用
        /// </summary>
        public string DiagramRouteID
        {
            get
            {
                return "0451";
            }
        }


       


      



        #endregion


        #region 公共属性

        /// <summary>
        /// 得到 当前菜单的 Uri
        /// </summary>
        public string MenuUri
        {
            get
            {

                try
                {
                    //从参数中得到
                    return Bocom.Silverlight.InitParames.Instance.Parames["MenuUri"] as string;
                }
                catch
                {
                    return "";
                }
            }
        }


        /// <summary>
        /// 得到 登陆界面背景图LoginImage Uri
        /// </summary>
        public string LoginImage
        {
            get
            {

                try
                {
                    //从参数中得到
                    return Bocom.Silverlight.InitParames.Instance.Parames["LoginImage"] as string;
                }
                catch
                {
                    return "";
                }
            }
        }

        /// <summary>
        /// 显示示意图一个静态的页面
        /// </summary>
        public string GrapathUI
        {
            get
            {

                try
                {
                    //从参数中得到
                    return Bocom.Silverlight.InitParames.Instance.Parames["GrapathUI"] as string;
                }
                catch
                {
                    return "";
                }
            }
        }



        #endregion




        /// <summary>
        /// 获得浅绿色
        /// </summary>
        public static SolidColorBrush LightGreen
        {
            get { return new SolidColorBrush(Color.FromArgb(128, 144, 238, 144)); }
        }

        /// <summary>
        /// 获得淡红色（玫瑰色）
        /// </summary>
        public static SolidColorBrush Rosiness
        {
            get { return new SolidColorBrush(Color.FromArgb(128, 255, 128, 128)); }
        }

        /// <summary>
        /// 获得浅蓝色
        /// </summary>
        public static SolidColorBrush LightBlue
        {
            get { return new SolidColorBrush(Color.FromArgb(255,222,236,255)); }
        }

        /// <summary>
        /// 驾驶员请求状态维持时间（10秒）
        /// </summary>
        public static int DriverAskedTime
        {
            get
            {
                return 10;
            }
        }
    }
}
